//
//  YWNotifyManager.h
//  maintain
//
//  Created by 郑想 on 15/11/6.
//  Copyright © 2015年 ewin. All rights reserved.
//

#import "YWDictMaintenanceType.h"
#include "YWSingleton.h"
#import <Foundation/Foundation.h>

@class YWMission;
@class YWPushWorkNotice;
@class YWPushWorkTask;
@class YWPushCancelMission;

#define kYWNOTIFICATION_MAINTENANCETYPE @"kYWNOTIFICATION_MAINTENANCETYPE"
/**任务完成，页面跳转*/
#define NOTIFICATION_MISSION_FINISHED @"NOTIFICATION_MISSION_FINISHED"
/**报障完成，页面跳转*/
#define NOTIFICATION_POST_TROUBLE_FINISHED @"NOTIFICATION_POST_TROUBLE_FINISHED"
/**刷新任务的进度*/
#define NOTIFICATION_REFRESH_MISSION @"NOTIFICATION_REFRESH_MISSION"

/**推送任务进度通知*/
#define NOTIFICATION_MISSION_PROGRESS @"NOTIFICATION_MISSION_PROGRESS"
/**请求维修任务*/
#define NOTIFICATION_assign_troubleMission @"NOTIFICATION_assign_troubleMission"

/**下发检测任务*/
#define NOTIFICATION_assign_detectMission @"NOTIFICATION_assign_detectMission"
/**下发检测任务*/
#define NOTIFICATION_assign_upKeepMission @"NOTIFICATION_assign_upKeepMission"
/**下发检测任务*/
#define NOTIFICATION_assign_inspectMission @"NOTIFICATION_assign_inspectMission"
/**下发检测任务*/
#define NOTIFICATION_assign_keepWatchMission @"NOTIFICATION_assign_keepWatchMission"

/**刷新上次维保时间*/
#define NOTIFICATION_LASTMAINTENANCETIME @"NOTIFICATION_LASTMAINTENANCETIME"
/**修改个人头像*/
#define NOTIFICATION_MODIFYSELFHEADICON @"NOTIFICATION_MODIFYSELFHEADICON"

/**刷新巡更页面*/
#define NOTIFICATION_ReflashPatrolLineView @"NOTIFICATION_ReflashPatrolLineView"


/**临时任务推送*/
#define NOTIFICATION_PUSH_TEMPMISSION @"NOTIFICATION_PUSH_TEMPMISSION"
/**公告通知推送*/
#define NOTIFICATION_PUSH_NOTICE @"NOTIFICATION_PUSH_NOTICE"

/**删除任务*/
#define NOTIFICATION_MISSION_DELETE @"NOTIFICATION_MISSION_DELETE"

@interface YWNotifyManager : NSObject
YWSingletonH(Manager)


/**
 *  添加任务完成通知监听
 *
 *  @param target    监听对象
 *  @param selector  收到通知响应方法
 */
- (void)addMissionFinishedObserver:(id)target selector:(SEL)selector;
/**
 *  移除保养任务完成通知监听
 *
 *  @param target 监听对象
 */
- (void)removeMissionFinishedObserver:(id)target;
/**
 *  发布任务完成通知
 *
  *  @param YWMission 完成的任务
 */
- (void)postMissionFinishedNotifyWithMission:(id)mission;

/**
 *  添加报障完成通知监听
 *
 *  @param target   监听对象
 *  @param selector 收到通知响应方法
 */
- (void)addPostTroubleObserver:(id)target selector:(SEL)selector;
/**
 *  移除报障完成通知监听
 *
 *  @param target 监听对象
 */
- (void)removePostTroubleObserver:(id)target;
/**
 *  发布报障完成通知
 *
 *  @param statuDic 记录的状态（正常或者故障）
 */
- (void)postTroubleNotifyWithStatu:(NSString*)equipmentId;

/**
 *  刷新任务进度的通知
 *
 *  @param target   监听对象
 *  @param selector 收到通知响应方法
 */
- (void)addRefreshMissionObserver:(id)target selector:(SEL)selector;
/**
 *  移除刷新任务进度的通知
 *
 *  @param target 监听对象
 */
- (void)removeRefreshMissionRecordObserver:(id)target;
/**
 *  发布刷新任务进度的通知
 *
 */
- (void)postRefreshMissionNotifyWithType;

/**
 *  推送刷新任务进度的通知
 *
 *  @param target   监听对象
 *  @param selector 收到通知响应方法
 */
- (void)addMissionProgressObserver:(id)target selector:(SEL)selector;
/**
 *  移除推送刷新任务进度的通知
 *
 *  @param target 监听对象
 */
- (void)removeMissionProgressObserver:(id)target;
/**
 *  发布推送刷新任务进度的通知
 *
 */
- (void)postMissionProgressNotify:(NSDictionary*)dic;

/**
 *  请求维修任务的通知
 *
 */
- (void)addRequestTroubleMissionObserver:(id)target selector:(SEL)selector;
/**
 *  移除请求维修任务的通知
 *
 */
- (void)removeRequestTroubleMissionObserver:(id)target;
/**
 *  发布推送刷新维修任务的通知
 *
 *  @param missionId 任务Id
 */
- (void)postRequestTroubleMissionNotify:(NSInteger)missionId;
///**
// *  添加刷新上次检测时间通知
// *
// */
//- (void)addLastMaintenanceTimeObserver:(id)target selector:(SEL)selector;
///**
// *  移除刷新上次检测时间通知
// *
// */
//- (void)removeLastMaintenanceTimeObserver:(id)target;
///**
// *  发布刷新上次检测时间通知
// *
// */
//- (void)postLastMaintenanceTimeNotify;
/**
 *  添加修改个人头像通知
 *
 */
- (void)addModifySelfHeadIconObserver:(id)target selector:(SEL)selector;
/**
 *  移除修改个人头像通知
 *
 */
- (void)removeModifySelfHeadIconObserver:(id)target;
/**
 *  发布修改个人头像通知
 *
 */
- (void)postModifySelfHeadIconNotify;
/**
 *  添加刷新巡更线路view通知
 *
 */
- (void)addReflashPatrolLineViewObserver:(id)target selector:(SEL)selector;
/**
 *  移除刷新巡更线路view通知
 *
 */
- (void)removeReflashPatrolLineViewObserver:(id)target;
/**
 *  发布刷新巡更线路view通知
 *
 */
- (void)postReflashPatrolLineViewNotify;

/**
 *  请求检测任务的通知
 *
 */
- (void)postAssignDetectMissionNotify;
- (void)addAssignDetectMissionObserver:(id)target selector:(SEL)selector;
/**
 *  请求保养任务的通知
 *
 */
- (void)postAssignUpKeepMissionNotify;
- (void)addAssignUpKeepMissionObserver:(id)target selector:(SEL)selector;
/**
 *  请求巡查任务的通知
 *
 */
- (void)postAssignInspectMissionNotify;
- (void)addAssignInspectMissionObserver:(id)target selector:(SEL)selector;
/**
 *  请求巡更任务的通知
 *
 */
- (void)postAssignKeepWatchMissionNotify;
- (void)addAssignKeepWatchMissionObserver:(id)target selector:(SEL)selector;
/**
 *  推送临时任务的通知
 *
 */
- (void)addPushTempMissionObserver:(id)target selector:(SEL)selector;
- (void)removePushTempMissionObserver:(id)target;
- (void)postPushTempMissionNotify:(YWPushWorkTask*)workTask;

/**
 *  推送通知公告的通知
 *
 */
- (void)addPushNoticeObserver:(id)target selector:(SEL)selector;
- (void)removePushNoticeObserver:(id)target;
- (void)postPushNoticeNotify:(YWPushWorkNotice*)notice;

- (void)addDeleteMissionObserver:(id)target selector:(SEL)selector;
- (void)removeDeleteMissionObserver:(id)target;
- (void)postDeleteMissionNotify:(YWPushCancelMission*)pushMission;

@end
